<!doctype html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <title>offset demo</title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }

    p {
      /* margin-left: 10px; */
    }
  </style>
  <script src="https://code.jquery.com/jquery-3.5.0.js"></script>
</head>

<body>

  <p>Hello</p>
  <p>2nd Paragraph</p>

  <script>
    var p = $("p").last();
    var offset = p.offset();
    p.html("left: " + offset.left + ", top: " + offset.top);
  </script>

</body>

</html>